<script>
	import {
		recordVisitor
	} from "./api/mini.visitor.js";
	export default {
		onLaunch: function() {
			
		
			// #ifdef APP-PLUS
			plus.navigator.closeSplashscreen();
		
			var w = plus.webview.open(
				'hybrid/html/advertise/advertise.html',
				'本地地址',
				{ top: 0, bottom: 0, zindex: 9999 },
				'fade-in',
				500
			);
			
			setTimeout(function() {
				plus.webview.close(w);
			}, 3000 );
			
			// #endif
			let type = 2
			
			// #ifdef H5
			type = 3
			// #endif
			
			// #ifdef MP-WEIXIN
			type = 2
			// #endif
			
			// #ifdef APP-PLUS
			type = 4
			// #endif
			recordVisitor({type}).then(res => {
				console.log('record:ok')
			  }).catch(err => {
				console.log('错误', err)
			  })
		},
		onShow: function() {
			console.log('App Show')
		},
		
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
  @import "uview-ui/index.scss";
  @import "style/main.scss";
  @import "components/common/timeline/timeLine.scss";
  @import "style/style-view-form.scss";
</style>
